<?php
/**
 * MoneyController.class.php
 * 交易信息控制器
 * 
 * @author  王中艺 <wangzy_smile@qq.com>
 * @date    2017-08-29
 */

namespace Attach\Controller;

class MoneyController extends BaseController {

    /**
     * 获取交易详情信息
     * @param   $id
     * @return  $deduct_list and $info
     */
    function getDetailItem(){
        $client     = $this->unEmptyParams(['id']);
        
        $this->response([
            'info'  => D('Money')->getItem(['id' => $client['id']]),
            'sql'   => D('Money')->getLastSql(),
            'deduct_list'   => D('Money')->getDeductList($client['id'])
        ]);
    }
}